package com.tuling.designpattern.factory.simple;



/**
 * @author 林瑞涛
 * @desc
 * @date 2021年07月05日 21:09
 */
public class Consumer {
    public static void main(String[] args) {

        /*Car car = new WuLing();
        Car car2 = new Tesla();*/

        //2.使用工厂创建
        Car car = CarFactory.getCar("五菱");
        Car car2 = CarFactory.getCar("特斯拉");

        car.name();
        car2.name();
    }
}
